   $(document).ready(function(){
       var processBar = $('[data-func="upload-process"]');
       var filePath = $('[data-name="ivr-filePath"]');
     
       $('#swfupload-control').swfupload({
           upload_url:"../media/upload",
           post_params:{
        	 nickName: "xiaona.nickName.com",
        	 appId: "5878d23d0f2b4a4c8ed929da5231df93"
           },
           use_query_string: true,
           file_post_name: "uploadFile",
           file_size_limit: "51200",
           file_types: "*.wav",
           file_types_description: "IVRMedia",
           file_upload_limit: 10,
           flash_url: "js/swfupload/swfupload.swf",
           button_image_url: "../js/swfupload/XPButtonUploadText_61x22.png",
           button_width:64,
           button_height:22,
           button_placeholder:$('#upload_button')[0],
           debug:false
       })
       .bind('fileQueued', function(event, file){
               processBar.text("开始上传...");
               $(this).swfupload('startUpload');
           })
           .bind('fileQueueError', function(event, file, errorCode, message){
               processBar.css({color:'red'}).text("上传失败:"+message);
           })
           .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){
           })
           .bind('uploadSuccess', function(event, file, serverData){
        	   var _json =JSON.parse(serverData);
        	   filePath.val(_json.fileName);
               processBar.css({color:'green'}).text(file.name+"上传成功");
           })
           .bind('uploadComplete', function(event, file){
               $(this).swfupload('startUpload');
           });

   });